﻿using System.Collections.Generic;
using Dost.Khcn.Data.EntityModel;
using Dost.Khcn.Data.Implements;
using Dost.Khcn.Data.Interfaces;

namespace Dost.Khcn.Biz
{
    public class DeTaiCapNhaNuocBiz
    {
        #region Properties

        private IDeTaiCapNhaNuocDao _deTaiCapNhaNuocDao;

        private IDeTaiCapNhaNuocDao DeTaiCapNhaNuocData
        {
            get
            {
                return (_deTaiCapNhaNuocDao ?? (_deTaiCapNhaNuocDao = new DeTaiCapNhaNuocDao()));
            }
        }

        #endregion

        public List<DeTaiCapNhaNuocView> GetDeTaiCapNhaNuocViews(int chuyenGiaId)
        {
            return chuyenGiaId <= 0 ? null : DeTaiCapNhaNuocData.GetDeTaiCapNhaNuocViews(chuyenGiaId);
        }

        public List<DeTaiCapNhaNuoc> GetDeTaiCapNhaNuocs(int chuyenGiaId)
        {
            return chuyenGiaId <= 0 ? null : DeTaiCapNhaNuocData.GetDeTaiCapNhaNuocs(chuyenGiaId);
        }

        public DeTaiCapNhaNuoc Create(DeTaiCapNhaNuoc deTaiCapNhaNuoc)
        {
            return DeTaiCapNhaNuocData.Create(deTaiCapNhaNuoc);
        }

        public void Update(DeTaiCapNhaNuoc deTaiCapNhaNuoc)
        {
            DeTaiCapNhaNuocData.Update(deTaiCapNhaNuoc);
        }

        public void Delete(int id)
        {
            DeTaiCapNhaNuocData.Delete(id);
        }
    }
}
